<div data-th-fragment="header" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
    <nav class="navbar-inverse">
        <div class="container">
            <div class="navbar-header" style="margin-right: 0px;padding-left: 20px">
                <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar" aria-expanded="false" aria-controls="navbar">
                    <span class="sr-only">Toggle navigation</span>
                    <span class="icon-bar"></span>
                    <span class="icon-bar"></span>
                    <span class="icon-bar"></span>
                </button>
                <div style="width: 185px;">
                    <a class="navbar-brand" style="padding: 3px;" data-th-href="@{/}">
                        <img data-th-src="@{/images/logo.png}" alt="">
                    </a>
                </div>
            </div>
            <div id="navbar" class="navbar-collapse collapse">
                <ul class="nav navbar-nav" style="text-align: center">
                    <li  data-th-class="${activeNav=='blog' or activeSubTab=='blog'?'active':''}"><a data-th-href="@{/blog}">　博 客　</a></li>
                    <!--<li data-th-class="${activeNav=='question' or activeSubTab=='question' ?'active':''}"><a href="/question">　问 答　</a></li>-->
                    <li>
                        <form data-th-action="@{/blog/s}" method="get" class="navbar-form navbar-left" style="margin-left:10px;margin-right: 10px;">
                            <div class="form-group">
                                <input type="text" style="border-radius: 0" required name="keyword" class="form-control" placeholder="整站搜索：关键字">
                            </div>

                            <button type="submit" style="border-radius: 0;background-color: #222222"  class="btn btn-default"><span class="glyphicon glyphicon-search" style="color: #ffffff"></span></button>
                        </form>
                    </li>
                </ul>
                <ul class="nav navbar-nav navbar-right" style="text-align: center">
                    <shiro:authenticated>
                        <li data-th-class="${activeNav=='user'?'active':''}"><a href="/my" style="color: #ffffff;font-weight: bolder">
                            [ <span  shiro:principal></span> ]</a></li>
                        <li><a href="/logout">注销</a></li>
                    </shiro:authenticated>
                    <shiro:notAuthenticated>
                        <li><a href="/register">注册</a></li>
                        <li><a href="/login">登录</a></li>
                    </shiro:notAuthenticated>
                </ul>
            </div><!--/.nav-collapse -->
        </div>
    </nav>
</div>